/*   1:    */ package com.atomikos.diagnostics;
/*   2:    */ 
/*   3:    */ import java.io.IOException;
/*   4:    */ import org.slf4j.Logger;
/*   5:    */ import org.slf4j.LoggerFactory;
/*   6:    */ 
/*   7:    */ public class Slf4jConsole
/*   8:    */   implements Console
/*   9:    */ {
/*  10: 46 */   private static final Logger log = LoggerFactory.getLogger("atomikos");
/*  11:    */   private int level;
/*  12:    */   
/*  13:    */   public Slf4jConsole()
/*  14:    */   {
/*  15: 53 */     int level = 1;
/*  16: 54 */     if (log.isInfoEnabled()) {
/*  17: 55 */       level = 2;
/*  18: 56 */     } else if (log.isDebugEnabled()) {
/*  19: 57 */       level = 3;
/*  20:    */     }
/*  21: 58 */     setLevel(level);
/*  22:    */   }
/*  23:    */   
/*  24:    */   public void close()
/*  25:    */     throws IOException
/*  26:    */   {}
/*  27:    */   
/*  28:    */   public int getLevel()
/*  29:    */   {
/*  30: 75 */     return this.level;
/*  31:    */   }
/*  32:    */   
/*  33:    */   public void print(String string)
/*  34:    */     throws IOException
/*  35:    */   {}
/*  36:    */   
/*  37:    */   public void print(String string, int level)
/*  38:    */     throws IOException
/*  39:    */   {}
/*  40:    */   
/*  41:    */   public void println(String string)
/*  42:    */     throws IOException
/*  43:    */   {
/*  44:100 */     println(string, 1);
/*  45:    */   }
/*  46:    */   
/*  47:    */   public void println(String string, int level)
/*  48:    */     throws IOException
/*  49:    */   {
/*  50:105 */     switch (level)
/*  51:    */     {
/*  52:    */     case 1: 
/*  53:107 */       if (log.isWarnEnabled()) {
/*  54:107 */         log.warn(string);
/*  55:    */       }
/*  56:    */       break;
/*  57:    */     case 2: 
/*  58:110 */       if (log.isInfoEnabled()) {
/*  59:110 */         log.info(string);
/*  60:    */       }
/*  61:    */       break;
/*  62:    */     case 3: 
/*  63:113 */       if (log.isDebugEnabled()) {
/*  64:113 */         log.debug(string);
/*  65:    */       }
/*  66:    */       break;
/*  67:    */     }
/*  68:    */   }
/*  69:    */   
/*  70:    */   public void setLevel(int level)
/*  71:    */   {
/*  72:126 */     this.level = level;
/*  73:    */   }
/*  74:    */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\atomikos-util\3.7.0\atomikos-util-3.7.0.jar
 * Qualified Name:     com.atomikos.diagnostics.Slf4jConsole
 * JD-Core Version:    0.7.0.1
 */